//获取应用实例
const app = getApp()

Page({

  data: {
    phone: '',
    hiddenmodalput: true,
    //可以通过hidden是否掩藏弹出框的属性，来指定那个弹出框 
    motto: 'Hello World',
    userInfo: {},
    hasUserInfo: false
  },

  userRegister:function () {
    wx.navigateTo({
      url: '../register/register'
    })
  },
  livingScene:function () {
    wx.redirectTo({
      url: '../video/video'
    })
  },
  voiceprintScene: function () {
    wx.redirectTo({
      url: '../voice/voice'
    })
  },
  livingVoicePrintScence: function () {
    wx.redirectTo({
      url: '../videovoice/videovoice'
    })
  },

  modalinputWin:function(e){
    this.setData({
      hiddenmodalput: !this.data.hiddenmodalput
    })
  },
  //事件处理函数
  //点击按钮弹出指定的hiddenmodalput弹出框  
  modalinput: function (e) {
    if (e.detail.value){
      this.setData({
        phone: e.detail.value
      })
    }
  },
  //取消按钮  
  cancel: function () {
    this.setData({
      hiddenmodalput: true
    });
  },
  //确认  
  confirm: function () {
    this.setData({
      hiddenmodalput: true
    })

    // this.modalinput();
    wx.navigateTo({
      url: '../register/register?phone='+this.data.phone
    })

  },
  onLoad: function () {
    
  }
})
